package com.itqf.utils;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;

/**
 * @author 徐老板
 * @date 2020/1/29   17:47
 */
public class ShiroUtils {
    public static Session getSession(){
       return SecurityUtils.getSubject().getSession();
    }

    public static void setCode(String key,String value){
        getSession().setAttribute(key,value );
    }

    public static String getCode(){
        return (String) getSession().getAttribute("code");
    }


}
